import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import '../public/icon.css'
// import VueAMap from 'vue-amap'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


import globalComponent from './components'
import { createPinia } from 'pinia'
import persistedState from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(persistedState)
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}



globalComponent(app)
app.use(pinia)
app.use(router)
// app.use(VueAMap)
app.use(ElementPlus, {
    locale: zhCn,
  })
app.mount('#app')
